﻿using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Kaidou.Model;

public partial class menu1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Login"] == null)
        {
            Response.Redirect("login.aspx");
        }

        LoginModel loginModel = (LoginModel)Session["loginModel"];
        if ((loginModel.isKumiaiin() || loginModel.isTagyousha()) && sessioncontrol.control())
        {
            Response.Redirect("control.aspx");
        }

    }

    protected void logout(object sender, EventArgs e)
    {
        Session.Remove("Login");
        Session.Remove("Login_Name");
        Session.Remove("Login_Union_code");
        Session.Remove("Login_Branch_code");
        Session.Remove("Login_role");
        Response.Redirect("login.aspx");
    }
}
